package com.bajie.bjlisten.sevice;


import com.bajie.bjlisten.entity.BjAds;
import com.bajie.bjlisten.mapper.BjAdsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service
public class BjAdsService {

    @Autowired
    BjAdsMapper bjAdsMapper;

    @Transactional
    public int save(BjAds bjAds) {
        int value = 0;
        value = bjAdsMapper.save(bjAds);
        if (value > 0)
            return value;
        else
            throw new RuntimeException();

    }

}
